package com.net.model;

import java.sql.Timestamp;

public class Pack {
	private int id;
	
	/**
	 * 网络层协议
	 * 常见的有:IP、ICMP、ARP、RARP、IGMP
	 */
	private String net_protocol;
	/**
	 * 传输层协议
	 * 常见的有:TCP、UDP
	 */
	private String tra_protocol;
	/**
	 * 应用层协议
	 * 常见的有:HTTP、FTP、TELNET、SMTP、TFTP、SNMP、DHCP
	 */
	private String app_protocol;
	/**
	 * 源IP
	 */
	private String src_ip;
	/**
	 * 目的IP
	 */
	private String dst_ip;
	/**
	 * 源MAC地址
	 */
	private String src_mac;
	/**
	 * 目的MAC地址
	 */
	private String dst_mac;
	/**
	 * 源端口
	 */
	private int src_port;
	/**
	 * 目的端口
	 */
	private int dst_port;
	/**
	 * 数据包长度(记录网络层数据包大小,可用于流量统计)
	 */
	private int packet_len;
	
	/**
	 * 其它信息，用于字段拓展，json格式存储
	 */
	private String others;
	
	private Timestamp create_time;
	private Timestamp update_time;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getNet_protocol() {
		return net_protocol;
	}
	public void setNet_protocol(String net_protocol) {
		this.net_protocol = net_protocol;
	}
	public String getTra_protocol() {
		return tra_protocol;
	}
	public void setTra_protocol(String tra_protocol) {
		this.tra_protocol = tra_protocol;
	}
	public String getApp_protocol() {
		return app_protocol;
	}
	public void setApp_protocol(String app_protocol) {
		this.app_protocol = app_protocol;
	}
	public String getSrc_ip() {
		return src_ip;
	}
	public void setSrc_ip(String src_ip) {
		this.src_ip = src_ip;
	}
	public String getDst_ip() {
		return dst_ip;
	}
	public void setDst_ip(String dst_ip) {
		this.dst_ip = dst_ip;
	}
	public String getSrc_mac() {
		return src_mac;
	}
	public void setSrc_mac(String src_mac) {
		this.src_mac = src_mac;
	}
	public String getDst_mac() {
		return dst_mac;
	}
	public void setDst_mac(String dst_mac) {
		this.dst_mac = dst_mac;
	}
	public int getSrc_port() {
		return src_port;
	}
	public void setSrc_port(int src_port) {
		this.src_port = src_port;
	}
	public int getDst_port() {
		return dst_port;
	}
	public void setDst_port(int dst_port) {
		this.dst_port = dst_port;
	}
	public int getPacket_len() {
		return packet_len;
	}
	public void setPacket_len(int packet_len) {
		this.packet_len = packet_len;
	}
	public String getOthers() {
		return others;
	}
	public void setOthers(String others) {
		this.others = others;
	}
	public Timestamp getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Timestamp create_time) {
		this.create_time = create_time;
	}
	public Timestamp getUpdate_time() {
		return update_time;
	}
	public void setUpdate_time(Timestamp update_time) {
		this.update_time = update_time;
	}
	@Override
	public String toString() {
		return "Packet [id=" + id + ", net_protocol=" + net_protocol + ", tra_protocol=" + tra_protocol
				+ ", app_protocol=" + app_protocol + ", src_ip=" + src_ip + ", dst_ip=" + dst_ip + ", src_mac="
				+ src_mac + ", dst_mac=" + dst_mac + ", src_port=" + src_port + ", dst_port=" + dst_port
				+ ", packet_len=" + packet_len + ", others=" + others + ", create_time=" + create_time
				+ ", update_time=" + update_time + "]";
	}
	
	
	
	
}
